 <header class="header">
  <nav class="navbar navbar-default" id="navbar">
    {notempty name="article"}
    <style>
      #article_name { display:none;font-size:1.8em;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;line-height:60px;padding-left:1em; }
    </style>
    <div class="container" id="article_name">{$article.title}</div>
    {/notempty}
    <div class="container" id="articlenav">
      <div class="header-topbar hidden-xs link-border">
        <ul class="site-nav topmenu">
          {foreach name="vice_nav_menu" item="vol" key="k" }
          <li><a href="{$vol.href}" {$vol.tg}>{$vol.name}</a></li>
          {/foreach}
          <!-- <li class="dropdown">
            <a class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" rel="nofollow">关注本站 <span class="caret"></span></a>
            <ul class="dropdown-menu header-topbar-dropdown-menu">
              <li><a data-toggle="modal" data-target="#WeChat" rel="nofollow"><i class="fa fa-weixin"></i> 微信</a></li>
              <li><a href="#" rel="nofollow"><i class="fa fa-weibo"></i> 微博</a></li>
              <li><a data-toggle="modal" data-target="#areDeveloping" rel="nofollow"><i class="fa fa-rss"></i> RSS</a></li>
            </ul>
          </li> -->
        </ul>
        {//***************用户信息***************}
        {if empty($user)}
        <a href="{:url('login/login')}" class="login" rel="nofollow">Hi,请登录</a>&nbsp;&nbsp;
        <a href="{:url('login/register')}" class="register" rel="nofollow">我要注册</a>&nbsp;&nbsp;
        <!-- <a href="" rel="nofollow">找回密码</a> -->
        {else /}
        <li class="dropdown" style="width:20%;">
          <a id="dropdownMenu2" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" rel="nofollow">
            Hi，{$user.nick} <span class="caret"></span>
          </a>
          <ul class="dropdown-menu header-topbar-dropdown-menu" aria-labelledby="dropdownMenu2">
            <li class="dropdown-header">写文章</li>
            <li style="text-align:left;"><a href="{:url('article/writer')}" target="_blank">写文章</a></li>
            <li style="text-align:left;"><a href="{:url('article/writer',array('editortype'=>'editormd'))}" target="_blank">Markdown编辑器</a></li>
            <li style="text-align:left;"><a href="{:url('article/writer',array('editortype'=>'ckeditor5'))}" target="_blank">CKEditor5编辑器</a></li>
            <li style="text-align:left;"><a href="{:url('article/writer',array('editortype'=>'handyeditor'))}" target="_blank">HandyEditor编辑器</a></li>
            <hr style="margin:0;">
            <li style="text-align:left;"><a href="{:url('article/writer')}" target="_blank">个人中心</a></li>
            <hr style="margin:0;">
            <li class="dropdown-header">用户管理</li>
            {notpresent name="user['tr']"}
            <li style="text-align:left;"><a href="{:url('login/login')}" target="_blank">登录账号</a></li>
            {foreach name="$user.other" item="vol" key="k" }
            <li style="text-align:left;"><a href="{:url('login/turn_login',array('uid'=>$vol[0]))}">切换：{$vol.1}</a></li>
            {/foreach}
            <li style="text-align:left;"><a href="{:url('login/logout')}">退出登录</a></li>
            {else /}
            <li style="text-align:left;"><a href="{:url('login/register')}">注册此账号</a></li>
            {/notpresent}
          </ul>
        </li>
        {/if}
        {//***************用户信息***************}
      </div>
      <div class="navbar-header">
        <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#header-navbar" aria-expanded="false">
          <span class="sr-only"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span>
        </button>
        <h1 class="logo hvr-bounce-in"><a href="/index/blog"><img src="__MZBLOG__/logo.png" alt="梦幻空间站"></a></h1>
      </div>
{//************************************************************主导航************************************************************}
      <div class="collapse navbar-collapse" id="header-navbar">
        <ul class="nav navbar-nav navbar-right">
          {present name="main_nav_menu"}
          {volist name="main_nav_menu" id="value" key="k"}
            {notpresent name="value.zclass"}
            <li class="hidden-index {if $menu==$value['id']}active{/if}"><a data-cont="{$value.name}" {$value.tg} href="{$value.href}">{$value.name}</a></li>
            {else /}
            <li class="dropdown {if $menu==$value['id']}active{/if}">
              <a class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false" rel="nofollow">
                {$value.name} <span class="caret"></span>
              </a>
              <ul class="dropdown-menu header-topbar-dropdown-menu" style="min-width:110px;">
                {volist name="value.zclass" id="vol"}
                <li><a href="{$vol.href}" {$vol.tg} rel="nofollow">{$vol.name}</a></li>
                {/volist}
              </ul>
            </li>
            {/notpresent}
          {/volist}
          {/present}
          {notempty name="user"}
          <li class="hidden-index"><a data-cont="链接管理" href="{:url('link/index')}">链接管理</a></li>
          <li class="hidden-index"><a data-cont="文章管理" href="{:url('article/index',array('groupId'=>-1))}">文章管理</a></li>
          {/notempty}
        </ul>
        <form class="navbar-form visible-xs" action="/Search" method="post">
          <div class="input-group">
            <input type="text" name="keyword" class="form-control" placeholder="请输入关键字" maxlength="20" autocomplete="off">
            <span class="input-group-btn">
              <button class="btn btn-default btn-search" name="search" type="submit">搜索</button>
            </span>
          </div>
        </form>
      </div>
{//************************************************************主导航************************************************************}
    </div>
  </nav>
</header>